Statistical Mechanics And Quantum Entanglement